<script setup>
defineProps({
  title: {
    type: String,
    default: '标题',
  },
  more: {
    type: String,
    default: '查看更多',
  },
  isBottom: {
    type: Boolean,
    default: false,
  },
})
</script>

<template>
  <div class="detail-panel">
    <div class="top">
      <h2>{{ title }}</h2>
    </div>
    <div class="content">
      <slot></slot>
    </div>
    <div class="bottom" v-if="!isBottom">
      <span>{{ more }}</span>
      <van-icon name="arrow" />
    </div>
  </div>
</template>

<style lang="less" scoped>
.detail-panel {
  padding: 0 15px;
  margin-top: 12px;
  border-top: 5px solid #f2f3f4;
  background-color: #fff;
}
.top {
  height: 50px;
  line-height: 50px;
  border-bottom: 1px solid #eee;
  font-size: 20px;
  color: #333;
}
.content {
  padding: 8px 0;
}
.bottom {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: 44px;
  line-height: 44px;
  color: #ff9645;
  font-size: 14px;
  font-weight: 600;
}
</style>
